<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>S110_nRF51822/Include/ble/softdevice/ble_l2cap.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('ble__l2cap_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">S110_nRF51822/Include/ble/softdevice/ble_l2cap.h</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* Copyright (c) 2011 Nordic Semiconductor. All Rights Reserved.</span>
<a name="l00002"></a>00002 <span class="comment"> *</span>
<a name="l00003"></a>00003 <span class="comment"> * The information contained herein is confidential property of Nordic Semiconductor. The use,</span>
<a name="l00004"></a>00004 <span class="comment"> * copying, transfer or disclosure of such information is prohibited except by express written</span>
<a name="l00005"></a>00005 <span class="comment"> * agreement with Nordic Semiconductor.</span>
<a name="l00006"></a>00006 <span class="comment"> *</span>
<a name="l00007"></a>00007 <span class="comment"> */</span>
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef BLE_L2CAP_H__</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define BLE_L2CAP_H__ </span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;ble_types.h&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;ble_ranges.h&quot;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &quot;ble_err.h&quot;</span>
<a name="l00020"></a>00020 
<a name="l00023"></a><a class="code" href="group___b_l_e___e_r_r_o_r_s___l2_c_a_p.html#ga258b4a1e6ac5f32e23036ef0b88af3fa">00023</a> <span class="preprocessor">#define BLE_ERROR_L2CAP_CID_IN_USE            (NRF_L2CAP_ERR_BASE + 0x000)  </span>
<a name="l00026"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#gacc63c6e5847699642179a1ec792fe1c1">00026</a> <span class="preprocessor">#define BLE_L2CAP_MTU_DEF           (23)    </span>
<a name="l00028"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#gaf3346d406893055ab1cb3cf04ce094c6">00028</a> <span class="preprocessor">#define BLE_L2CAP_CID_INVALID       (0x0000) </span>
<a name="l00029"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#ga04c14ff9adffadf03baad98d7632b620">00029</a> <span class="preprocessor">#define BLE_L2CAP_CID_DYN_BASE      (0x0040) </span>
<a name="l00031"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#gacd843243997a3af18139d54258e6b7ba">00031</a> <span class="preprocessor">#define BLE_L2CAP_CID_DYN_MAX       (8) </span>
<a name="l00034"></a>00034 <span class="preprocessor">enum </span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>{
<a name="l00036"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960a8f63d756a51b0be0708c3b1dab568863">00036</a>   <a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960a8f63d756a51b0be0708c3b1dab568863">SVC_BLE_L2CAP_CID_REGISTER</a> = BLE_L2CAP_SVC_BASE,  
<a name="l00037"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960af494ed2b4c9dbb9d1835dba52eb099ec">00037</a>   <a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960af494ed2b4c9dbb9d1835dba52eb099ec">SVC_BLE_L2CAP_CID_UNREGISTER</a>,                     
<a name="l00038"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960a5af4c97f9dc2ec759a1272ea702378a7">00038</a>   <a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960a5af4c97f9dc2ec759a1272ea702378a7">SVC_BLE_L2CAP_TX</a>                                  
<a name="l00039"></a>00039 };
<a name="l00040"></a>00040 
<a name="l00042"></a>00042 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00043"></a>00043 {
<a name="l00044"></a><a class="code" href="structble__l2cap__header__t.html#a8aed22e2c7b283705ec82e0120515618">00044</a>   uint16_t   <a class="code" href="structble__l2cap__header__t.html#a8aed22e2c7b283705ec82e0120515618">len</a>;                                 
<a name="l00045"></a><a class="code" href="structble__l2cap__header__t.html#aeb65c8711b864df01fca95cfe904d924">00045</a>   uint16_t   <a class="code" href="structble__l2cap__header__t.html#aeb65c8711b864df01fca95cfe904d924">cid</a>;                                 
<a name="l00046"></a>00046 } <a class="code" href="structble__l2cap__header__t.html" title="Packet header format for L2CAP transmission.">ble_l2cap_header_t</a>;
<a name="l00047"></a>00047 
<a name="l00049"></a>00049 <span class="keyword">enum</span> 
<a name="l00050"></a>00050 {
<a name="l00051"></a><a class="code" href="group___b_l_e___l2_c_a_p.html#ggadb49720dc49f7d4e4cf9adbf2948e409af6d68dde17c172258858ea9d9c4488e3">00051</a>   <a class="code" href="group___b_l_e___l2_c_a_p.html#ggadb49720dc49f7d4e4cf9adbf2948e409af6d68dde17c172258858ea9d9c4488e3">BLE_L2CAP_EVT_RX</a>  = BLE_L2CAP_EVT_BASE          
<a name="l00052"></a>00052 };
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 
<a name="l00056"></a>00056 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00057"></a>00057 {
<a name="l00058"></a>00058   <a class="code" href="structble__l2cap__header__t.html" title="Packet header format for L2CAP transmission.">ble_l2cap_header_t</a> header;                      
<a name="l00059"></a><a class="code" href="structble__l2cap__evt__rx__t.html#aa86e1085c6a16f60258f29c9d5fc2144">00059</a>   uint8_t    data[1];                             
<a name="l00060"></a>00060 } <a class="code" href="structble__l2cap__evt__rx__t.html" title="L2CAP Received packet event report.">ble_l2cap_evt_rx_t</a>;
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 
<a name="l00064"></a>00064 <span class="keyword">typedef</span> <span class="keyword">struct</span>
<a name="l00065"></a>00065 {
<a name="l00066"></a><a class="code" href="structble__l2cap__evt__t.html#a0d5ffe38d68e48d81e61fc6a4999ae68">00066</a>   uint16_t <a class="code" href="structble__l2cap__evt__t.html#a0d5ffe38d68e48d81e61fc6a4999ae68">conn_handle</a>;                           
<a name="l00067"></a>00067   <span class="keyword">union</span>
<a name="l00068"></a>00068   {
<a name="l00069"></a><a class="code" href="structble__l2cap__evt__t.html#a1062c2fd55e93cc460794676922f3971">00069</a>     <a class="code" href="structble__l2cap__evt__rx__t.html" title="L2CAP Received packet event report.">ble_l2cap_evt_rx_t</a> <a class="code" href="structble__l2cap__evt__t.html#a1062c2fd55e93cc460794676922f3971">rx</a>;                        
<a name="l00070"></a>00070   } params;
<a name="l00071"></a>00071 } <a class="code" href="structble__l2cap__evt__t.html" title="L2CAP event callback event structure.">ble_l2cap_evt_t</a>;
<a name="l00072"></a>00072 
<a name="l00073"></a>00073 
<a name="l00086"></a>00086 uint32_t SVCALL(<a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960a8f63d756a51b0be0708c3b1dab568863">SVC_BLE_L2CAP_CID_REGISTER</a>) <a class="code" href="group___b_l_e___l2_c_a_p.html#ga2aaf8b78b35a3df63a78660f36508291" title="Register a CID with L2CAP.">ble_l2cap_cid_register</a>(uint16_t cid);
<a name="l00087"></a>00087 
<a name="l00099"></a>00099 uint32_t SVCALL(<a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960af494ed2b4c9dbb9d1835dba52eb099ec">SVC_BLE_L2CAP_CID_UNREGISTER</a>) <a class="code" href="group___b_l_e___l2_c_a_p.html#ga5f662ea728b2c347cfbfa52a64e0e0aa" title="Unregister a CID with L2CAP.">ble_l2cap_cid_unregister</a>(uint16_t cid);
<a name="l00100"></a>00100 
<a name="l00115"></a>00115 uint32_t SVCALL(<a class="code" href="group___b_l_e___l2_c_a_p.html#ggaf9bdc3014f3d54c426b6d2df10de4960a5af4c97f9dc2ec759a1272ea702378a7">SVC_BLE_L2CAP_TX</a>) <a class="code" href="group___b_l_e___l2_c_a_p.html#gac102ffd559be41e4a1743dfed349f129" title="Transmit an L2CAP packet.">ble_l2cap_tx</a>(uint16_t conn_handle, <a class="code" href="structble__l2cap__header__t.html" title="Packet header format for L2CAP transmission.">ble_l2cap_header_t</a> const * const p_header, uint8_t const * const p_data);
<a name="l00116"></a>00116 
<a name="l00117"></a>00117 
<a name="l00118"></a>00118 <span class="preprocessor">#endif // BLE_L2CAP_H__</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><b>ble_l2cap.h</b>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
